Skip to contentSkip to conversation

Getting kernel patch to work

PATCH Greg Wilson-Lindberg 3 participants 5 messages Mar 10, 2020 – Mar 12, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

I'm using a boot2qt version of a warrior Yocto build for a raspberry pi4.

I'm trying to apply a patch to a driver in the linux kernel. I'm following the procedures laid out in the book "Embedded Linux Systems with the Yocto Project".

I already have a kernel .bbappend file that I'm using to modify the kernel config and that is working correctly.

I started with a patch file that I found on the internet that addressed the problem that I have and I added support for it to my .bbappend file. I know that it has been found correctly because I initially specified the file path incorrectly and received an error.

After building my image I go to look at the STAGING_KERNEL_DIR and I do not see my changes applied to the file. I even added an error to the patch to see if it was compiling and it didn't trigger the error.

At this point I went back fully to "Embedded Linux Systems with the Yocto Project" and created my own patch. I still don't see it being applied.

Can somebody please tell me where I should see the patch applied?

Here is how I modified my .bbappend:

# additions to Kernel configuration

SRC_URi += "file://0001-drm-vc4-Keep-the-binner-BO-through-suspend-GWL.patch"

do_configure_append() {
.
.
.
}

And here is the patch:

From d95e6ead8d25165014f8746082656da6345889b0 Mon Sep 17 00:00:00 2001
From: Greg Wilson-Lindberg <[email protected]>
Date: Tue, 10 Mar 2020 16:29:08 -0700
Subject: [PATCH 1/1] drm-vc4-Keep-the-binner-BO-through-suspend-GWL

---
 drivers/gpu/drm/vc4/vc4_v3d.c | 7 -------

 1 file changed, 7 deletions(-)
drivers/gpu/drm/vc4/vc4_v3d.c +0 -0
index e47e29426078..ff7812066668 100644
@@ -303,9 +303,6 @@ static int vc4_v3d_runtime_suspend(struct device *dev)


     vc4_irq_uninstall(vc4->dev);

-    drm_gem_object_put_unlocked(&vc4->bin_bo->base.base);
-    vc4->bin_bo = NULL;
-
     clk_disable_unprepare(v3d->clk);

     return 0;
@@ -317,10 +314,6 @@ static int vc4_v3d_runtime_resume(struct device *dev) struct vc4_dev *vc4 = v3d->vc4;
     int ret;

-    ret = vc4_allocate_bin_bo(vc4->dev);
-    if (ret)
-        return ret;
-
     ret = clk_prepare_enable(v3d->clk);
     if (ret != 0)
         return ret;

Signature · 5 lines
2.17.1


Thanks in advance,
Greg Wilson-Lindberg
#1 lore raw

Hi,

Quoted 3 lines · Greg Wilson-Lindberg

SRC_URi += "file://0001-drm-vc4-Keep-the-binner-BO-through-suspend-GWL.patch”

It looks like you have a typo here, the last letter of SRC_URI isn’t capitalized.

-a

#2 lore raw

Hi Anders,

Good catch, thanks for seeing that.

I also realized that I was missing a FILESEXTRAPATHS_prepend. I have tried both:

FILESEXTRAPATHS_prepend := "$(FILE_DIRNAME)/files:" and
FILESEXTRAPATHS_prepend := "$(THISDIR)/files:"

In both cases I don't see the expansion (i.e. I see '$(FILE_DIRNAME)/files:' or '$(THISDIR)/files:') in the list of searched directories. I would think that I should see the expanded directory path.

Here is the net beginning of my .bbappend file:

# additions to Kernel configuration

FILESEXTRAPATHS_prepend := "$(FILE_DIRNAME)/files:" #FILESEXTRAPATHS_prepend := "$(THISDIR)/files:"
SRC_URI+= "file://0001-drm-vc4-Keep-the-binner-BO-through-suspend.patch"

Regards,
Greg

________________________________
From: [email protected] <[email protected]> on behalf of Anders Montonen <[email protected]>
Sent: Tuesday, March 10, 2020 11:07:33 PM
To: Yocto list discussion
Subject: Re: [yocto] Getting kernel patch to work

Hi,

Quoted 3 lines · Greg Wilson-Lindberg

SRC_URi += "file://0001-drm-vc4-Keep-the-binner-BO-through-suspend-GWL.patch"

It looks like you have a typo here, the last letter of SRC_URI isn't capitalized.

-a

#3 lore raw

${} and not $()

Quoted 44 lines · Greg Wilson-Lindberg

Hi Anders,

Good catch, thanks for seeing that.

I also realized that I was missing a FILESEXTRAPATHS_prepend. I have tried both:

FILESEXTRAPATHS_prepend := "$(FILE_DIRNAME)/files:" and
FILESEXTRAPATHS_prepend := "$(THISDIR)/files:"

In both cases I don't see the expansion (i.e. I see '$(FILE_DIRNAME)/files:' or '$(THISDIR)/files:') in the list of searched directories. I would think that I should see the expanded directory path.

Here is the net beginning of my .bbappend file:

# additions to Kernel configuration

FILESEXTRAPATHS_prepend := "$(FILE_DIRNAME)/files:" #FILESEXTRAPATHS_prepend := "$(THISDIR)/files:"
SRC_URI+= "file://0001-drm-vc4-Keep-the-binner-BO-through-suspend.patch"

Regards,
Greg

________________________________
From: [email protected] <[email protected]> on behalf of Anders Montonen <[email protected]>
Sent: Tuesday, March 10, 2020 11:07:33 PM
To: Yocto list discussion
Subject: Re: [yocto] Getting kernel patch to work

Hi,

Quoted 3 lines · Greg Wilson-Lindberg

SRC_URi += "file://0001-drm-vc4-Keep-the-binner-BO-through-suspend-GWL.patch"

It looks like you have a typo here, the last letter of SRC_URI isn't capitalized.

-a

#4 lore raw

Hi Denys,
I guess I have been rather blind when putting this together. That's what I get for not copying and pasting.

Thanks,
Greg

Quoted 63 lines

-----Original Message-----
From: Denys Dmytriyenko <[email protected]>
Sent: Wednesday, March 11, 2020 4:55 PM
To: Greg Wilson-Lindberg <[email protected]>
Cc: Anders Montonen <[email protected]>; Yocto list discussion <[email protected]>
Subject: Re: [yocto] Getting kernel patch to work

${} and not $()

Quoted 6 lines · Greg Wilson-Lindberg

Hi Anders,

Good catch, thanks for seeing that.

I also realized that I was missing a FILESEXTRAPATHS_prepend. I have tried

both:

Quoted 6 lines

FILESEXTRAPATHS_prepend := "$(FILE_DIRNAME)/files:" and
FILESEXTRAPATHS_prepend := "$(THISDIR)/files:"

In both cases I don't see the expansion (i.e. I see '$(FILE_DIRNAME)/files:'

or '$(THISDIR)/files:') in the list of searched directories. I would think that I should see the expanded directory path.

Quoted 8 lines

Here is the net beginning of my .bbappend file:

# additions to Kernel configuration

FILESEXTRAPATHS_prepend := "$(FILE_DIRNAME)/files:" #FILESEXTRAPATHS_prepend := "$(THISDIR)/files:" SRC_URI+= "file://0001-drm-vc4-Keep-the-binner-BO-through-

suspend.patch"

Quoted 8 lines

Regards,
Greg

________________________________
From: [email protected] <[email protected]> on

behalf of Anders Montonen <[email protected]>

Quoted 7 lines

Sent: Tuesday, March 10, 2020 11:07:33 PM
To: Yocto list discussion
Subject: Re: [yocto] Getting kernel patch to work

Hi,

Quoted 1 line

On 11 Mar 2020, at 1:57, Greg Wilson-Lindberg <[email protected]>

Quoted 2 lines · wrote:
Quoted 2 lines

SRC_URi += "file://0001-drm-vc4-Keep-the-binner-BO-through-suspend-

GWL.patch"

Quoted 2 lines

It looks like you have a typo here, the last letter of SRC_URI isn't

capitalized.

Quoted 5 lines

-a